package com.xiangb.springbootjpa.controller;

import com.xiangb.springbootjpa.config.PersonProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xb
 * @descripton:
 * @date 2020/12/20
 */
@RestController
public class HelloController {

    @Autowired
    private PersonProperties personProperties;

    @RequestMapping(value = "/hello",method = RequestMethod.GET)
    public String say(){
        return "姓名：" + personProperties.getName() + " 年龄：" + personProperties.getAge();
    }


}
